package com.mlong.admin.modular.unicomjs.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kordar.admin.enums.CommonActive;
import com.kordar.datalist.DataColumn;
import com.kordar.datalist.formatter.IntegerFormatter;
import com.mlong.admin.modular.unicomjs.formatter.GoodsTypeFormatter;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@TableName("SuZhou_Unicome_goods")
public class Goods {

    @DataColumn(alias = "id")
    @TableId(type = IdType.INPUT)
    private String goodsId;

    @DataColumn(formatter = GoodsTypeFormatter.class)
    @NotNull
    private Long pid;

    @DataColumn
    @NotEmpty
    private String name;

    @DataColumn(formatter = IntegerFormatter.class)
    private Integer active = CommonActive.OPEN.getCode();
}
